<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>bmap</title>
    <style>
      body,
      html,
      #allmap {
        width: 100%;
        height: 100%;
        overflow: hidden;
        margin: 0;
        font-family: "微软雅黑";
      }
    </style>
  </head>
  <body>
    <div id="allmap"></div>
  </body>
</html>
<script
  type="text/javascript"
  src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=CPxHyHH5XD8mUnmRPbv9BehycOEklp34"
></script>
<script>
  const bmap = new BMapGL.Map("allmap"); // 创建Map实例
  // 百度官方坐标拾取器地址 https://api.map.baidu.com/lbsapi/getpoint/index.html
  const point = new BMapGL.Point(116.404, 39.915); // 经纬度
  const zoom = 12; //  缩放
  bmap.centerAndZoom(point, zoom); // 设置中心点坐标和地图缩放倍数
  bmap.enableScrollWheelZoom(); // 开启鼠标滚轮缩放
  bmap.setHeading(30); // 地图旋转角度 X轴
  bmap.setTilt(30); // 地图倾斜角度 Y轴
</script>
